package org.example.zuoye.mapper;

import org.example.zuoye.entity.Appoint;
import org.example.zuoye.vo.AppointInfo;

import java.util.Date;
import java.util.List;

/**
* @author 86198
* @description 针对表【appoint】的数据库操作Mapper
* @createDate 2024-08-10 15:51:37
* @Entity org.example.zuoye.entity.Appoint
*/
public interface AppointMapper {

    int deleteByPrimaryKey(Long id);

    List<Appoint> selectByScheduleId(Long scheduleId);


    int insert(Appoint record);

    int insertSelective(Appoint record);

    // Appoint selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Appoint record);

    int updateByPrimaryKey(Appoint record);

    List<Appoint> selectByPrimaryKey(Appoint appoint);

    /**
     * 获取所有的集合
     * @param ids
     * @return
     */
    List<Appoint> findByids(Integer[] ids);

    Appoint select(Long app_id);

    int save(Appoint appoint);

    /**
     * 根据病人id查询所有的预约
     * @param patId
     * @return
     */
    List<AppointInfo> getByPatId(Integer patId);

    List<AppointInfo> getByPatIdAndDate(Integer patId, Date weekAgo);
}
